<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" type="text/css" th:href="@{/js/elementui/theme-chalk/index.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/css/pointConfig.css}"/>
    <div th:insert="main :: common_head"></div>
</head>
<body>

<div class="row-fluid">
    <div id="content" class="span10" style="width: 100%">
        <ul class="breadcrumb" th:if="${#request.getParameter('breadcrumb') == 'true'}">
            <li>
                <i class="fas fa-circle-notch"></i>
                <a id="home" href="#" onclick="parent.location.reload()">主页</a>
                <i class="icon-angle-right"></i>
            </li>
            <li><a href="#">作业配置页面</a></li>
        </ul>
        <div class="row-fluid sortable">
            <div class="box span12">
                <div class="box-header" data-original-title>
                    <h2><i class="halflings-icon white user"></i><span class="break"></span>作业配置</h2>
                    <div class="box-icon"></div>
                </div>
                <div id="app">
                    <el-form
                            style="margin-bottom: 0px!important;"
                            :inline="true"
                            v-model="dataForm"
                            @keyup.enter.native="getDataList()"
                    >
<!--                        <el-form-item>-->
<!--                            <el-input-->
<!--                                    v-model="dataForm.key"-->
<!--                                    placeholder="参数名"-->
<!--                                    clearable-->
<!--                            ></el-input>-->
<!--                        </el-form-item>-->
                        <el-form-item>
<!--                            <el-button @click="getDataList()">查询</el-button>-->
                            <el-button
                                    type="primary"
                                    @click="batchEdit"
                                    :disabled="dataListSelections.length <= 0">
                                修改
                            </el-button>
                        </el-form-item>
<!--                        搜索框-->
                        <el-form-item>
                            <el-input
                                    style="width: 200px;margin-top: 4px;margin-left: 10px!important;"
                                    v-model="search"
                                    size="medium"
                                    placeholder="输入代码或名称搜索">
                            </el-input>
                        </el-form-item>
                    </el-form>
                    <el-table
                            ref="multipleTable"
                            :data="tableData.filter(data => !search ||
                            data.name.toLowerCase().includes(search.toLowerCase()) ||
                            data.devCode.toLowerCase().includes(search.toLowerCase()))"
                            id="elTable"
                            :row-key="getRowKey"
                            style="width: 97%"
                            @selection-change="selectionChangeHandle"
                            max-height="600"
                            :stripe="true">
                        <el-table-column fixed align="center" width="50" type="selection" :reserve-selection="true"></el-table-column>
                        <el-table-column
                                align="center"
                                prop="devCode"
                                label="点位代码"
                                width="165">
                        </el-table-column>
                        <el-table-column
                                align="center"
                                prop="name"
                                label="点位名称"
                                width="165">
                        </el-table-column>
                        <el-table-column label="下载" align="center" prop="downloadRadio">
                            <el-table-column width="100" align="center">
                                <template slot="header" slot-scope="scope">
                                    <el-checkbox
                                            @change="downloadDayCheckboxChange"
                                            v-model = "downloadDayCheckbox"
                                    >天</el-checkbox>
                                </template>
                                <template slot-scope="scope">
                                    <el-checkbox v-model="scope.row.intervalTypeDownloadList" label="3"
                                    @change="listChange(scope)"><span></span></el-checkbox>
                                </template>
                            </el-table-column>
                            <el-table-column width="100" align="center">
                                <template slot="header" slot-scope="scope">
                                    <el-checkbox
                                            @change="downloadHourCheckboxChange"
                                            v-model = "downloadHourCheckbox"
                                    >小时</el-checkbox>
                                </template>
                                <template slot-scope="scope">
                                    <el-checkbox v-model="scope.row.intervalTypeDownloadList" label="2"
                                                 @change="listChange(scope)"><span></span></el-checkbox>
                                </template>
                            </el-table-column>
                            <el-table-column width="100" align="center">
                                <template slot="header" slot-scope="scope">
                                    <el-checkbox
                                            @change="downloadMinuteCheckboxChange"
                                            v-model = "downloadMinuteCheckbox"
                                    >分钟</el-checkbox>
                                </template>
                                <template slot-scope="scope">
                                    <el-checkbox v-model="scope.row.intervalTypeDownloadList" label="1"
                                                 @change="listChange(scope)"><span></span></el-checkbox>
                                </template>
                            </el-table-column>
                        </el-table-column>
                        <el-table-column label="上传" align="center">
                            <el-table-column width="100" align="center">
                                <template slot="header" slot-scope="scope">
                                    <el-checkbox
                                            @change="uploadDayCheckboxChange"
                                            v-model = "uploadDayCheckbox"
                                    >天</el-checkbox>
                                </template>
                                <template slot-scope="scope">
                                    <el-checkbox v-model="scope.row.intervalTypeUploadList" label="3"
                                                 @change="listChange(scope)"><span></span></el-checkbox>
                                </template>
                            </el-table-column>
                            <el-table-column width="100" align="center">
                                <template slot="header" slot-scope="scope">
                                    <el-checkbox
                                            @change="uploadHourCheckboxChange"
                                            v-model = "uploadHourCheckbox"
                                    >小时</el-checkbox>
                                </template>
                                <template slot-scope="scope">
                                    <el-checkbox v-model="scope.row.intervalTypeUploadList" label="2"
                                                 @change="listChange(scope)"><span></span></el-checkbox>
                                </template>
                            </el-table-column>
                            <el-table-column width="100" align="center">
                                <template slot="header" slot-scope="scope">
                                    <el-checkbox
                                            @change="uploadMinuteCheckboxChange"
                                            v-model = "uploadMinuteCheckbox"
                                    >分钟</el-checkbox>
                                </template>

                                <template slot-scope="scope">
                                    <el-checkbox v-model="scope.row.intervalTypeUploadList" label="1"
                                                 @change="listChange(scope)"><span></span></el-checkbox>
                                </template>
                            </el-table-column>
                        </el-table-column>
                        <el-table-column label="数据类型" align="center">
                            <el-table-column width="90" align="center">
                                <template slot="header" slot-scope="scope">
                                    <el-checkbox
                                            @change="datatypeMaxCheckboxChange"
                                            v-model = "datatypeMaxCheckbox"
                                    >最大值</el-checkbox>
                                </template>
                                <template slot-scope="scope">
                                    <el-radio v-model="scope.row.statisticType" label="max"
                                              @change="listChange(scope)"><span></span></el-radio>
                                </template>
                            </el-table-column>
                            <el-table-column width="90" align="center">
                                <template slot="header" slot-scope="scope">
                                    <el-checkbox
                                            @change="datatypeMinCheckboxChange"
                                            v-model = "datatypeMinCheckbox"
                                    >最小值</el-checkbox>
                                </template>
                                <template slot-scope="scope">
                                    <el-radio v-model="scope.row.statisticType" label="min"
                                              @change="listChange(scope)"><span></span></el-radio>
                                </template>
                            </el-table-column>
                            <el-table-column width="90" align="center">
                                <template slot="header" slot-scope="scope">
                                    <el-checkbox
                                            @change="datatypeAveCheckboxChange"
                                            v-model = "datatypeAveCheckbox"
                                    >平均值</el-checkbox>
                                </template>
                                <template slot-scope="scope">
                                    <el-radio v-model="scope.row.statisticType" label="ave"
                                              @change="listChange(scope)"><span></span></el-radio>
                                </template>
                            </el-table-column>
                            <el-table-column width="90" align="center">
                                <template slot="header" slot-scope="scope">
                                    <el-checkbox
                                            @change="datatypeDiffCheckboxChange"
                                            v-model = "datatypeDiffCheckbox"
                                    >差值</el-checkbox>
                                </template>
                                <template slot-scope="scope">
                                    <el-radio v-model="scope.row.statisticType" label="diff"
                                              @change="listChange(scope)"><span></span></el-radio>
                                </template>
                            </el-table-column>
                        </el-table-column>
                        <el-table-column label="数据来源"  align="center">
                            <el-table-column width="85" align="center">
                                <template slot="header" slot-scope="scope">
                                    <el-checkbox
                                            @change="sourceTypeCoralCheckboxChange"
                                            v-model = "sourceTypeCoralCheckbox"
                                    >coral</el-checkbox>
                                </template>
                                <template slot-scope="scope">
                                    <el-radio v-model="scope.row.sourceType" label="1"
                                              @change="listChange(scope)"><span></span></el-radio>
                                </template>
                            </el-table-column>
                            <el-table-column width="85" align="center">
                                <template slot="header" slot-scope="scope">
                                    <el-checkbox
                                            @change="sourceTypeXhaCheckboxChange"
                                            v-model = "sourceTypeXhaCheckbox"
                                    >xha</el-checkbox>
                                </template>
                                <template slot-scope="scope">
                                    <el-radio v-model="scope.row.sourceType" label="2"
                                              @change="listChange(scope)"><span></span></el-radio>
                                </template>
                            </el-table-column>
                        </el-table-column>
                    </el-table>
                </div>
            </div>
        </div>
    </div>
</div>

<script th:src="@{/js/jquery-1.9.1.min.js}"></script>
<script th:src="@{/js/vue.js}"></script>
<script th:src="@{/js/elementui/index.js}"></script>
<script th:src="@{/js/detect-element-resize.js}"></script>
<script th:src="@{/js/iframe-resize.js}"></script>
<script th:src="@{/js/pointConfig.js}"></script>

</body>
</html>